home *** CD-ROM | disk | FTP | other *** search
- global gModeState, gGlobalStepCount, gLocalStepCount, gAlphaState, gDefaultSettings, oIndexScroller, oIndexMediator, gTrackingList, gTrackMe, gInputField, gFirstReplayF, gNopeSND, gTheFTword, gFTsearchscope, gModeList, gTrackMode, gTrackingModeslist, gPiconcastloc, gPiconGarage, gNumofpicons, oIndexSlider
-
- on hInitTracker
- set gTrackMe to 1
- set gTrackMode to 1
- set gDefaultSettings to [:]
- addProp(gDefaultSettings, #ENCY, [#ENCY, 1, 1, "A", 1, mGetThisEntryName(oIndexMediator, #ENCY, 1, 1)])
- set gTrackingList to []
- set gTrackingModeslist to [0, 0, 0, 0, 0, 0, 0]
- end
-
- on hCaptureThisMoment
- set LtempPacket to []
- addAt(LtempPacket, 1, gModeState)
- addAt(LtempPacket, 2, gGlobalStepCount)
- addAt(LtempPacket, 3, gLocalStepCount)
- if gModeState <> #EPISSUB then
- addAt(LtempPacket, 4, hFilterSearchChars(the text of field gInputField))
- else
- addAt(LtempPacket, 4, gAlphaState)
- end if
- addAt(LtempPacket, 5, 0)
- addAt(LtempPacket, 6, the text of field gInputField)
- addAt(LtempPacket, 7, mWhatFSlistType(oIndexScroller))
- addAt(LtempPacket, 8, gTheFTword)
- addAt(LtempPacket, 9, gFTsearchscope)
- if gTrackMe then
- if count(gTrackingList) > 25 then
- deleteAt(gTrackingList, 1)
- end if
- append(gTrackingList, LtempPacket)
- set gFirstReplayF to 1
- else
- set gTrackMe to 1
- end if
- if gTrackMode then
- hCaptureThisMode(LtempPacket)
- else
- set gTrackMode to 1
- end if
- end
-
- on hCaptureThisMode pTempPacket
- set vThisPosition to getPos(gModeList, gModeState)
- setAt(gTrackingModeslist, vThisPosition, pTempPacket)
- end
-
- on hBackTrack
- global gYouClickedF, gModeState
- if count(gTrackingList) < 1 then
- hReportStatus("There are no more entries to display by backing up.")
- hearit(gNopeSND)
- return
- end if
- if gModeState = #CHRO then
- set gYouClickedF to 1
- end if
- set gTrackMe to 0
- if gFirstReplayF then
- deleteAt(gTrackingList, count(gTrackingList))
- set gFirstReplayF to 0
- end if
- set Lpacket to getLast(gTrackingList)
- if voidp(Lpacket) then
- return
- end if
- hSetMode(getAt(Lpacket, 1))
- hGoBack(Lpacket)
- deleteAt(gTrackingList, count(gTrackingList))
- end
-
- on hGoBack pTheseSettings
- if not objectp(pTheseSettings) then
- abort()
- end if
- set Lthenewmode to getAt(pTheseSettings, 1)
- if not ((Lthenewmode = #FoundSet) or (Lthenewmode = #EPISSUB)) then
- put getAt(pTheseSettings, 6) into field gInputField
- hilite char 999 of field gInputField
- hGetNewAttrList(getAt(pTheseSettings, 4), 0)
- hMiniFind()
- if gModeState = #CHRO then
- if gGlobalStepCount > 3 then
- hHiliteItem(4)
- else
- hHiliteItem(gGlobalStepCount)
- end if
- if count(getLast(gPiconGarage)) > 0 then
- set gPiconcastloc to getaProp(gPiconGarage, gGlobalStepCount)
- set gNumofpicons to count(gPiconcastloc)
- hDisplayPicons()
- else
- if getaProp(gPiconGarage, gGlobalStepCount) = 0 then
- hPurgeMedia()
- end if
- end if
- end if
- else
- if Lthenewmode = #EPISSUB then
- put getAt(pTheseSettings, 6) into field gInputField
- hilite char 999 of field gInputField
- mSwitchtoEpisSubindex(oIndexScroller, getAt(pTheseSettings, 4))
- hMiniFind()
- else
- set Lsize to count(mGetModesAttribGroup(oIndexMediator, #FoundSet, 1))
- set Lpointer to getAt(pTheseSettings, 2)
- if Lpointer > Lsize then
- hearit(gNopeSND)
- hReportStatus("Sorry, cannot access that index.")
- return
- end if
- hSetGlobalCounter(getAt(pTheseSettings, 2))
- hSetAlphaState(getAt(pTheseSettings, 4))
- hSwitchFTsearchscope(#ENCY)
- hputmsg("HgoBack calling hsetmode")
- hSetMode(#FoundSet)
- set gTheFTword to getAt(pTheseSettings, 8)
- set gFTsearchscope to getAt(pTheseSettings, 9)
- hRevisitFoundSet(getAt(pTheseSettings, 7))
- mReDefineSlider(oIndexSlider, 1, mGetModesMaxEntryNum(oIndexMediator) - 6, 0)
- mSetSlider(oIndexSlider, gGlobalStepCount)
- mHighlightMyScrollLine(oIndexScroller, gGlobalStepCount)
- end if
- end if
- end
-
- on hRecall pWhatMode
- if pWhatMode <> #EPISSUB then
- set vThisPosition to getPos(gModeList, pWhatMode)
- set LmyItem to getAt(gTrackingModeslist, vThisPosition)
- if LmyItem = 0 then
- if gModeState = #FoundSet then
- hearit(gNopeSND)
- hReportStatus("No search has been performed in this session as yet.")
- return
- end if
- end if
- if string(LmyItem) contains string(pWhatMode) then
- if pWhatMode = #TOPICS then
- set vListlen to count(getAt(mGetEntireMode(oIndexMediator, #TOPICS), 1))
- if getAt(LmyItem, 3) <= vListlen then
- set Lfound to 1
- else
- set Lfound to 0
- end if
- else
- set Lfound to 1
- end if
- else
- set Lfound to 0
- end if
- else
- set Lfound to 0
- end if
- if Lfound = 1 then
- hGoBack(getAt(gTrackingModeslist, vThisPosition))
- if pWhatMode = #FoundSet then
- mReDefineSlider(oIndexSlider, 1, mGetModesMaxEntryNum(oIndexMediator) - 6, 0)
- set vMax to the iSliderMax of oIndexSlider
- if gGlobalStepCount > vMax then
- set gGlobalStepCount to vMax
- end if
- mSetSlider(oIndexSlider, gGlobalStepCount)
- mHighlightMyScrollLine(oIndexScroller, gGlobalStepCount)
- end if
- else
- hGoBack(getaProp(gDefaultSettings, pWhatMode))
- end if
- end
-
- on hRevisitFoundSet pListtype
- mSetFSlistType(oIndexScroller, pListtype)
- if pListtype = 0 then
- hShowTheFoundHits(gGlobalStepCount, pListtype)
- else
- if pListtype = 1 then
- hShowTheFoundHits(gGlobalStepCount, pListtype)
- else
- if pListtype = 2 then
- hShowTheUpdate(pListtype)
- else
- if pListtype = 3 then
- hShowTheUpdate(pListtype)
- else
- end if
- end if
- end if
- end if
- end
-